﻿namespace HZY.Api.Admin.Controllers.Systems;

[ControllerDescriptor(MenuId = "41", DisplayName = "服务器信息")]
public class SysServerController : AdminControllerBase<SysServerService>
{
    public SysServerController(IServiceProvider serviceProvider) : base(serviceProvider)
    {
    }

    /// <summary>
    /// 获取服务器配置信息
    /// </summary>
    /// <returns></returns>
    [HttpGet]
    [ActionDescriptor(DisplayName = "获取服务器配置信息")]
    public Task<dynamic> GetServerBaseAsync()
    {
        return this.Service.GetServerBaseAsync();
    }

    /// <summary>
    /// 获取服务器使用信息
    /// </summary>
    /// <returns></returns>
    [HttpGet]
    [ActionDescriptor(DisplayName = "获取服务器使用信息")]
    public dynamic GetServerUsed()
    {
        return this.Service.GetServerUsed();
    }

    /// <summary>
    /// 获取服务器磁盘信息
    /// </summary>
    /// <returns></returns>
    [HttpGet]
    [ActionDescriptor(DisplayName = "获取服务器磁盘信息")]
    public List<DiskInfo> GetServerDisk()
    {
        return this.Service.GetServerDisk();
    }

    /// <summary>
    /// 获取框架主要程序集
    /// </summary>
    /// <returns></returns>
    [HttpGet]
    [ActionDescriptor(DisplayName = "获取框架主要程序集")]
    public dynamic GetAssemblyList()
    {
        return this.Service.GetAssemblyList();
    }
}
